.class public Lmyview/PullToRefreshLayout;
.super Landroid/widget/RelativeLayout;
.source "PullToRefreshLayout.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;,
        Lmyview/PullToRefreshLayout$MyTimer;,
        Lmyview/PullToRefreshLayout$OnRefreshListener;
    }
.end annotation


# static fields
.field public static final DONE:I = 0x5

.field public static final FAIL:I = 0x1

.field public static final INIT:I = 0x0

.field public static final LOADING:I = 0x4

.field public static final REFRESHING:I = 0x2

.field public static final RELEASE_TO_LOAD:I = 0x3

.field public static final RELEASE_TO_REFRESH:I = 0x1

.field public static final SUCCEED:I = 0x0

.field public static final TAG:Ljava/lang/String; = "PullToRefreshLayout"


# instance fields
.field public MOVE_SPEED:F

.field private canPullDown:Z

.field private canPullUp:Z

.field private downY:F

.field private isLayout:Z

.field private isTouch:Z

.field private lastY:F

.field private loadStateImageView:Landroid/view/View;

.field private loadStateTextView:Landroid/widget/TextView;

.field private loadingView:Landroid/view/View;

.field private loadmoreDist:F

.field private loadmoreView:Landroid/view/View;

.field private mContext:Landroid/content/Context;

.field private mEvents:I

.field private mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

.field public pullDownY:F

.field private pullUpView:Landroid/view/View;

.field private pullUpY:F

.field private pullView:Landroid/view/View;

.field private pullableView:Landroid/view/View;

.field private radio:F

.field private refreshDist:F

.field private refreshStateImageView:Landroid/view/View;

.field private refreshStateTextView:Landroid/widget/TextView;

.field private refreshView:Landroid/view/View;

.field private refreshingAnimation:Landroid/view/animation/RotateAnimation;

.field private refreshingView:Landroid/view/View;

.field private rotateAnimation:Landroid/view/animation/RotateAnimation;

.field private state:I

.field private timer:Lmyview/PullToRefreshLayout$MyTimer;

.field updateHandler:Landroid/os/Handler;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 4
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    const/4 v3, 0x1

    const/high16 v2, 0x43480000    # 200.0f

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 184
    invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    .line 48
    iput v1, p0, Lmyview/PullToRefreshLayout;->state:I

    .line 59
    iput v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    .line 61
    iput v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    .line 64
    iput v2, p0, Lmyview/PullToRefreshLayout;->refreshDist:F

    .line 66
    iput v2, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    .line 70
    const/high16 v0, 0x41000000    # 8.0f

    iput v0, p0, Lmyview/PullToRefreshLayout;->MOVE_SPEED:F

    .line 72
    iput-boolean v1, p0, Lmyview/PullToRefreshLayout;->isLayout:Z

    .line 74
    iput-boolean v1, p0, Lmyview/PullToRefreshLayout;->isTouch:Z

    .line 76
    const/high16 v0, 0x40000000    # 2.0f

    iput v0, p0, Lmyview/PullToRefreshLayout;->radio:F

    .line 110
    iput-boolean v3, p0, Lmyview/PullToRefreshLayout;->canPullDown:Z

    .line 111
    iput-boolean v3, p0, Lmyview/PullToRefreshLayout;->canPullUp:Z

    .line 118
    new-instance v0, Lmyview/PullToRefreshLayout$1;

    invoke-direct {v0, p0}, Lmyview/PullToRefreshLayout$1;-><init>(Lmyview/PullToRefreshLayout;)V

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->updateHandler:Landroid/os/Handler;

    .line 185
    invoke-direct {p0, p1}, Lmyview/PullToRefreshLayout;->initView(Landroid/content/Context;)V

    .line 186
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    const/4 v3, 0x1

    const/high16 v2, 0x43480000    # 200.0f

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 190
    invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 48
    iput v1, p0, Lmyview/PullToRefreshLayout;->state:I

    .line 59
    iput v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    .line 61
    iput v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    .line 64
    iput v2, p0, Lmyview/PullToRefreshLayout;->refreshDist:F

    .line 66
    iput v2, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    .line 70
    const/high16 v0, 0x41000000    # 8.0f

    iput v0, p0, Lmyview/PullToRefreshLayout;->MOVE_SPEED:F

    .line 72
    iput-boolean v1, p0, Lmyview/PullToRefreshLayout;->isLayout:Z

    .line 74
    iput-boolean v1, p0, Lmyview/PullToRefreshLayout;->isTouch:Z

    .line 76
    const/high16 v0, 0x40000000    # 2.0f

    iput v0, p0, Lmyview/PullToRefreshLayout;->radio:F

    .line 110
    iput-boolean v3, p0, Lmyview/PullToRefreshLayout;->canPullDown:Z

    .line 111
    iput-boolean v3, p0, Lmyview/PullToRefreshLayout;->canPullUp:Z

    .line 118
    new-instance v0, Lmyview/PullToRefreshLayout$1;

    invoke-direct {v0, p0}, Lmyview/PullToRefreshLayout$1;-><init>(Lmyview/PullToRefreshLayout;)V

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->updateHandler:Landroid/os/Handler;

    .line 191
    invoke-direct {p0, p1}, Lmyview/PullToRefreshLayout;->initView(Landroid/content/Context;)V

    .line 192
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;
    .param p3, "defStyle"    # I

    .prologue
    const/4 v3, 0x1

    const/high16 v2, 0x43480000    # 200.0f

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 196
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 48
    iput v1, p0, Lmyview/PullToRefreshLayout;->state:I

    .line 59
    iput v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    .line 61
    iput v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    .line 64
    iput v2, p0, Lmyview/PullToRefreshLayout;->refreshDist:F

    .line 66
    iput v2, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    .line 70
    const/high16 v0, 0x41000000    # 8.0f

    iput v0, p0, Lmyview/PullToRefreshLayout;->MOVE_SPEED:F

    .line 72
    iput-boolean v1, p0, Lmyview/PullToRefreshLayout;->isLayout:Z

    .line 74
    iput-boolean v1, p0, Lmyview/PullToRefreshLayout;->isTouch:Z

    .line 76
    const/high16 v0, 0x40000000    # 2.0f

    iput v0, p0, Lmyview/PullToRefreshLayout;->radio:F

    .line 110
    iput-boolean v3, p0, Lmyview/PullToRefreshLayout;->canPullDown:Z

    .line 111
    iput-boolean v3, p0, Lmyview/PullToRefreshLayout;->canPullUp:Z

    .line 118
    new-instance v0, Lmyview/PullToRefreshLayout$1;

    invoke-direct {v0, p0}, Lmyview/PullToRefreshLayout$1;-><init>(Lmyview/PullToRefreshLayout;)V

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->updateHandler:Landroid/os/Handler;

    .line 197
    invoke-direct {p0, p1}, Lmyview/PullToRefreshLayout;->initView(Landroid/content/Context;)V

    .line 198
    return-void
.end method

.method static synthetic access$0(Lmyview/PullToRefreshLayout;)F
    .locals 1

    .prologue
    .line 61
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    return v0
.end method

.method static synthetic access$1(Lmyview/PullToRefreshLayout;)Z
    .locals 1

    .prologue
    .line 74
    iget-boolean v0, p0, Lmyview/PullToRefreshLayout;->isTouch:Z

    return v0
.end method

.method static synthetic access$10(Lmyview/PullToRefreshLayout;)Lmyview/PullToRefreshLayout$OnRefreshListener;
    .locals 1

    .prologue
    .line 50
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

    return-object v0
.end method

.method static synthetic access$11(Lmyview/PullToRefreshLayout;)V
    .locals 0

    .prologue
    .line 214
    invoke-direct {p0}, Lmyview/PullToRefreshLayout;->hide()V

    return-void
.end method

.method static synthetic access$2(Lmyview/PullToRefreshLayout;)I
    .locals 1

    .prologue
    .line 48
    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    return v0
.end method

.method static synthetic access$3(Lmyview/PullToRefreshLayout;)F
    .locals 1

    .prologue
    .line 64
    iget v0, p0, Lmyview/PullToRefreshLayout;->refreshDist:F

    return v0
.end method

.method static synthetic access$4(Lmyview/PullToRefreshLayout;)Lmyview/PullToRefreshLayout$MyTimer;
    .locals 1

    .prologue
    .line 68
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->timer:Lmyview/PullToRefreshLayout$MyTimer;

    return-object v0
.end method

.method static synthetic access$5(Lmyview/PullToRefreshLayout;)F
    .locals 1

    .prologue
    .line 66
    iget v0, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    return v0
.end method

.method static synthetic access$6(Lmyview/PullToRefreshLayout;F)V
    .locals 0

    .prologue
    .line 61
    iput p1, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    return-void
.end method

.method static synthetic access$7(Lmyview/PullToRefreshLayout;)Landroid/view/View;
    .locals 1

    .prologue
    .line 86
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullView:Landroid/view/View;

    return-object v0
.end method

.method static synthetic access$8(Lmyview/PullToRefreshLayout;I)V
    .locals 0

    .prologue
    .line 312
    invoke-direct {p0, p1}, Lmyview/PullToRefreshLayout;->changeState(I)V

    return-void
.end method

.method static synthetic access$9(Lmyview/PullToRefreshLayout;)Landroid/view/View;
    .locals 1

    .prologue
    .line 97
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullUpView:Landroid/view/View;

    return-object v0
.end method

.method private changeState(I)V
    .locals 4
    .param p1, "to"    # I

    .prologue
    const/16 v3, 0x8

    const/4 v1, 0x4

    const/4 v2, 0x0

    .line 314
    iput p1, p0, Lmyview/PullToRefreshLayout;->state:I

    .line 315
    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    packed-switch v0, :pswitch_data_0

    .line 359
    :goto_0
    return-void

    .line 319
    :pswitch_0
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateImageView:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

    .line 320
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090090

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 321
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullView:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->clearAnimation()V

    .line 322
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullView:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    .line 324
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateImageView:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

    .line 325
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090095

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 326
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullUpView:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->clearAnimation()V

    .line 327
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullUpView:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    goto :goto_0

    .line 331
    :pswitch_1
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090091

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 332
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullView:Landroid/view/View;

    iget-object v1, p0, Lmyview/PullToRefreshLayout;->rotateAnimation:Landroid/view/animation/RotateAnimation;

    invoke-virtual {v0, v1}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V

    goto :goto_0

    .line 336
    :pswitch_2
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullView:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->clearAnimation()V

    .line 337
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshingView:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    .line 338
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullView:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 339
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshingView:Landroid/view/View;

    iget-object v1, p0, Lmyview/PullToRefreshLayout;->refreshingAnimation:Landroid/view/animation/RotateAnimation;

    invoke-virtual {v0, v1}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V

    .line 340
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090092

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    goto :goto_0

    .line 344
    :pswitch_3
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090096

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 345
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullUpView:Landroid/view/View;

    iget-object v1, p0, Lmyview/PullToRefreshLayout;->rotateAnimation:Landroid/view/animation/RotateAnimation;

    invoke-virtual {v0, v1}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V

    goto :goto_0

    .line 349
    :pswitch_4
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullUpView:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->clearAnimation()V

    .line 350
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadingView:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    .line 351
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullUpView:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 352
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadingView:Landroid/view/View;

    iget-object v1, p0, Lmyview/PullToRefreshLayout;->refreshingAnimation:Landroid/view/animation/RotateAnimation;

    invoke-virtual {v0, v1}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V

    .line 353
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090097

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    goto/16 :goto_0

    .line 315
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
    .end packed-switch
.end method

.method private hide()V
    .locals 3

    .prologue
    .line 216
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->timer:Lmyview/PullToRefreshLayout$MyTimer;

    const-wide/16 v1, 0x5

    invoke-virtual {v0, v1, v2}, Lmyview/PullToRefreshLayout$MyTimer;->schedule(J)V

    .line 217
    return-void
.end method

.method private initView()V
    .locals 2

    .prologue
    .line 578
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    const v1, 0x7f0c0372

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->pullView:Landroid/view/View;

    .line 579
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    .line 580
    const v1, 0x7f0c0374

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 579
    iput-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateTextView:Landroid/widget/TextView;

    .line 581
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    const v1, 0x7f0c0373

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->refreshingView:Landroid/view/View;

    .line 582
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    const v1, 0x7f0c0375

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateImageView:Landroid/view/View;

    .line 584
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    const v1, 0x7f0c030e

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->pullUpView:Landroid/view/View;

    .line 585
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    .line 586
    const v1, 0x7f0c0310

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 585
    iput-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateTextView:Landroid/widget/TextView;

    .line 587
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    const v1, 0x7f0c030f

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->loadingView:Landroid/view/View;

    .line 588
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    const v1, 0x7f0c0311

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateImageView:Landroid/view/View;

    .line 589
    return-void
.end method

.method private initView(Landroid/content/Context;)V
    .locals 3
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 202
    iput-object p1, p0, Lmyview/PullToRefreshLayout;->mContext:Landroid/content/Context;

    .line 203
    new-instance v1, Lmyview/PullToRefreshLayout$MyTimer;

    iget-object v2, p0, Lmyview/PullToRefreshLayout;->updateHandler:Landroid/os/Handler;

    invoke-direct {v1, p0, v2}, Lmyview/PullToRefreshLayout$MyTimer;-><init>(Lmyview/PullToRefreshLayout;Landroid/os/Handler;)V

    iput-object v1, p0, Lmyview/PullToRefreshLayout;->timer:Lmyview/PullToRefreshLayout$MyTimer;

    .line 205
    const v1, 0x7f040011

    .line 204
    invoke-static {p1, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v1

    check-cast v1, Landroid/view/animation/RotateAnimation;

    iput-object v1, p0, Lmyview/PullToRefreshLayout;->rotateAnimation:Landroid/view/animation/RotateAnimation;

    .line 207
    const v1, 0x7f040012

    .line 206
    invoke-static {p1, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v1

    check-cast v1, Landroid/view/animation/RotateAnimation;

    iput-object v1, p0, Lmyview/PullToRefreshLayout;->refreshingAnimation:Landroid/view/animation/RotateAnimation;

    .line 209
    new-instance v0, Landroid/view/animation/LinearInterpolator;

    invoke-direct {v0}, Landroid/view/animation/LinearInterpolator;-><init>()V

    .line 210
    .local v0, "lir":Landroid/view/animation/LinearInterpolator;
    iget-object v1, p0, Lmyview/PullToRefreshLayout;->rotateAnimation:Landroid/view/animation/RotateAnimation;

    invoke-virtual {v1, v0}, Landroid/view/animation/RotateAnimation;->setInterpolator(Landroid/view/animation/Interpolator;)V

    .line 211
    iget-object v1, p0, Lmyview/PullToRefreshLayout;->refreshingAnimation:Landroid/view/animation/RotateAnimation;

    invoke-virtual {v1, v0}, Landroid/view/animation/RotateAnimation;->setInterpolator(Landroid/view/animation/Interpolator;)V

    .line 212
    return-void
.end method

.method private releasePull()V
    .locals 1

    .prologue
    const/4 v0, 0x1

    .line 366
    iput-boolean v0, p0, Lmyview/PullToRefreshLayout;->canPullDown:Z

    .line 367
    iput-boolean v0, p0, Lmyview/PullToRefreshLayout;->canPullUp:Z

    .line 368
    return-void
.end method


# virtual methods
.method public autoLoad()V
    .locals 1

    .prologue
    .line 567
    iget v0, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    neg-float v0, v0

    iput v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    .line 568
    invoke-virtual {p0}, Lmyview/PullToRefreshLayout;->requestLayout()V

    .line 569
    const/4 v0, 0x4

    invoke-direct {p0, v0}, Lmyview/PullToRefreshLayout;->changeState(I)V

    .line 571
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

    if-eqz v0, :cond_0

    .line 572
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

    invoke-interface {v0, p0}, Lmyview/PullToRefreshLayout$OnRefreshListener;->onLoadMore(Lmyview/PullToRefreshLayout;)V

    .line 573
    :cond_0
    return-void
.end method

.method public autoRefresh()V
    .locals 4

    .prologue
    .line 558
    new-instance v0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;-><init>(Lmyview/PullToRefreshLayout;Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;)V

    .line 559
    .local v0, "task":Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;
    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Integer;

    const/4 v2, 0x0

    const/16 v3, 0x14

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-virtual {v0, v1}, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 560
    return-void
.end method

.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 12
    .param p1, "ev"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v3, 0x2

    const/4 v11, 0x3

    const/4 v10, 0x0

    const/4 v9, 0x1

    const/4 v8, 0x0

    .line 378
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionMasked()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 503
    :cond_0
    :goto_0
    :pswitch_0
    invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

    .line 504
    return v9

    .line 381
    :pswitch_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    iput v0, p0, Lmyview/PullToRefreshLayout;->downY:F

    .line 382
    iget v0, p0, Lmyview/PullToRefreshLayout;->downY:F

    iput v0, p0, Lmyview/PullToRefreshLayout;->lastY:F

    .line 383
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->timer:Lmyview/PullToRefreshLayout$MyTimer;

    invoke-virtual {v0}, Lmyview/PullToRefreshLayout$MyTimer;->cancel()V

    .line 384
    iput v10, p0, Lmyview/PullToRefreshLayout;->mEvents:I

    .line 385
    invoke-direct {p0}, Lmyview/PullToRefreshLayout;->releasePull()V

    goto :goto_0

    .line 390
    :pswitch_2
    const/4 v0, -0x1

    iput v0, p0, Lmyview/PullToRefreshLayout;->mEvents:I

    goto :goto_0

    .line 393
    :pswitch_3
    iget v0, p0, Lmyview/PullToRefreshLayout;->mEvents:I

    if-nez v0, :cond_f

    .line 395
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    cmpl-float v0, v0, v8

    if-gtz v0, :cond_1

    .line 396
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullableView:Landroid/view/View;

    check-cast v0, Lmyview/Pullable;

    invoke-interface {v0}, Lmyview/Pullable;->canPullDown()Z

    move-result v0

    if-eqz v0, :cond_a

    .line 397
    iget-boolean v0, p0, Lmyview/PullToRefreshLayout;->canPullDown:Z

    if-eqz v0, :cond_a

    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    const/4 v1, 0x4

    if-eq v0, v1, :cond_a

    .line 401
    :cond_1
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v1

    iget v2, p0, Lmyview/PullToRefreshLayout;->lastY:F

    sub-float/2addr v1, v2

    iget v2, p0, Lmyview/PullToRefreshLayout;->radio:F

    div-float/2addr v1, v2

    add-float/2addr v0, v1

    iput v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    .line 402
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    cmpg-float v0, v0, v8

    if-gez v0, :cond_2

    .line 404
    iput v8, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    .line 405
    iput-boolean v10, p0, Lmyview/PullToRefreshLayout;->canPullDown:Z

    .line 406
    iput-boolean v9, p0, Lmyview/PullToRefreshLayout;->canPullUp:Z

    .line 408
    :cond_2
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    invoke-virtual {p0}, Lmyview/PullToRefreshLayout;->getMeasuredHeight()I

    move-result v1

    int-to-float v1, v1

    cmpl-float v0, v0, v1

    if-lez v0, :cond_3

    .line 409
    invoke-virtual {p0}, Lmyview/PullToRefreshLayout;->getMeasuredHeight()I

    move-result v0

    int-to-float v0, v0

    iput v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    .line 410
    :cond_3
    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    if-ne v0, v3, :cond_4

    .line 413
    iput-boolean v9, p0, Lmyview/PullToRefreshLayout;->isTouch:Z

    .line 437
    :cond_4
    :goto_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    iput v0, p0, Lmyview/PullToRefreshLayout;->lastY:F

    .line 439
    const-wide/high16 v0, 0x4000000000000000L    # 2.0

    const-wide/high16 v2, 0x4000000000000000L    # 2.0

    const-wide v4, 0x3ff921fb54442d18L    # 1.5707963267948966

    invoke-virtual {p0}, Lmyview/PullToRefreshLayout;->getMeasuredHeight()I

    move-result v6

    int-to-double v6, v6

    div-double/2addr v4, v6

    .line 440
    iget v6, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v7, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    invoke-static {v7}, Ljava/lang/Math;->abs(F)F

    move-result v7

    add-float/2addr v6, v7

    float-to-double v6, v6

    mul-double/2addr v4, v6

    .line 439
    invoke-static {v4, v5}, Ljava/lang/Math;->tan(D)D

    move-result-wide v4

    mul-double/2addr v2, v4

    add-double/2addr v0, v2

    double-to-float v0, v0

    iput v0, p0, Lmyview/PullToRefreshLayout;->radio:F

    .line 441
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    cmpl-float v0, v0, v8

    if-gtz v0, :cond_5

    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    cmpg-float v0, v0, v8

    if-gez v0, :cond_6

    .line 442
    :cond_5
    invoke-virtual {p0}, Lmyview/PullToRefreshLayout;->requestLayout()V

    .line 443
    :cond_6
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    cmpl-float v0, v0, v8

    if-lez v0, :cond_10

    .line 445
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v1, p0, Lmyview/PullToRefreshLayout;->refreshDist:F

    cmpg-float v0, v0, v1

    if-gtz v0, :cond_8

    .line 446
    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    if-eq v0, v9, :cond_7

    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    const/4 v1, 0x5

    if-ne v0, v1, :cond_8

    .line 449
    :cond_7
    invoke-direct {p0, v10}, Lmyview/PullToRefreshLayout;->changeState(I)V

    .line 451
    :cond_8
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v1, p0, Lmyview/PullToRefreshLayout;->refreshDist:F

    cmpl-float v0, v0, v1

    if-ltz v0, :cond_9

    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    if-nez v0, :cond_9

    .line 454
    invoke-direct {p0, v9}, Lmyview/PullToRefreshLayout;->changeState(I)V

    .line 473
    :cond_9
    :goto_2
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v1, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    invoke-static {v1}, Ljava/lang/Math;->abs(F)F

    move-result v1

    add-float/2addr v0, v1

    const/high16 v1, 0x41000000    # 8.0f

    cmpl-float v0, v0, v1

    if-lez v0, :cond_0

    .line 476
    invoke-virtual {p1, v11}, Landroid/view/MotionEvent;->setAction(I)V

    goto/16 :goto_0

    .line 415
    :cond_a
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    cmpg-float v0, v0, v8

    if-ltz v0, :cond_b

    .line 416
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullableView:Landroid/view/View;

    check-cast v0, Lmyview/Pullable;

    invoke-interface {v0}, Lmyview/Pullable;->canPullUp()Z

    move-result v0

    if-eqz v0, :cond_e

    iget-boolean v0, p0, Lmyview/PullToRefreshLayout;->canPullUp:Z

    if-eqz v0, :cond_e

    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    if-eq v0, v3, :cond_e

    .line 419
    :cond_b
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v1

    iget v2, p0, Lmyview/PullToRefreshLayout;->lastY:F

    sub-float/2addr v1, v2

    iget v2, p0, Lmyview/PullToRefreshLayout;->radio:F

    div-float/2addr v1, v2

    add-float/2addr v0, v1

    iput v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    .line 420
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    cmpl-float v0, v0, v8

    if-lez v0, :cond_c

    .line 422
    iput v8, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    .line 423
    iput-boolean v9, p0, Lmyview/PullToRefreshLayout;->canPullDown:Z

    .line 424
    iput-boolean v10, p0, Lmyview/PullToRefreshLayout;->canPullUp:Z

    .line 426
    :cond_c
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    invoke-virtual {p0}, Lmyview/PullToRefreshLayout;->getMeasuredHeight()I

    move-result v1

    neg-int v1, v1

    int-to-float v1, v1

    cmpg-float v0, v0, v1

    if-gez v0, :cond_d

    .line 427
    invoke-virtual {p0}, Lmyview/PullToRefreshLayout;->getMeasuredHeight()I

    move-result v0

    neg-int v0, v0

    int-to-float v0, v0

    iput v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    .line 428
    :cond_d
    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    const/4 v1, 0x4

    if-ne v0, v1, :cond_4

    .line 431
    iput-boolean v9, p0, Lmyview/PullToRefreshLayout;->isTouch:Z

    goto/16 :goto_1

    .line 434
    :cond_e
    invoke-direct {p0}, Lmyview/PullToRefreshLayout;->releasePull()V

    goto/16 :goto_1

    .line 436
    :cond_f
    iput v10, p0, Lmyview/PullToRefreshLayout;->mEvents:I

    goto/16 :goto_1

    .line 456
    :cond_10
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    cmpg-float v0, v0, v8

    if-gez v0, :cond_9

    .line 459
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    neg-float v0, v0

    iget v1, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    cmpg-float v0, v0, v1

    if-gtz v0, :cond_12

    .line 460
    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    if-eq v0, v11, :cond_11

    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    const/4 v1, 0x5

    if-ne v0, v1, :cond_12

    .line 462
    :cond_11
    invoke-direct {p0, v10}, Lmyview/PullToRefreshLayout;->changeState(I)V

    .line 465
    :cond_12
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    neg-float v0, v0

    iget v1, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    cmpl-float v0, v0, v1

    if-ltz v0, :cond_9

    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    if-nez v0, :cond_9

    .line 467
    invoke-direct {p0, v11}, Lmyview/PullToRefreshLayout;->changeState(I)V

    goto/16 :goto_2

    .line 480
    :pswitch_4
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v1, p0, Lmyview/PullToRefreshLayout;->refreshDist:F

    cmpl-float v0, v0, v1

    if-gtz v0, :cond_13

    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    neg-float v0, v0

    iget v1, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    cmpl-float v0, v0, v1

    if-lez v0, :cond_14

    .line 483
    :cond_13
    iput-boolean v10, p0, Lmyview/PullToRefreshLayout;->isTouch:Z

    .line 485
    :cond_14
    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    if-ne v0, v9, :cond_16

    .line 487
    invoke-direct {p0, v3}, Lmyview/PullToRefreshLayout;->changeState(I)V

    .line 489
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

    if-eqz v0, :cond_15

    .line 490
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

    invoke-interface {v0, p0}, Lmyview/PullToRefreshLayout$OnRefreshListener;->onRefresh(Lmyview/PullToRefreshLayout;)V

    .line 498
    :cond_15
    :goto_3
    invoke-direct {p0}, Lmyview/PullToRefreshLayout;->hide()V

    goto/16 :goto_0

    .line 491
    :cond_16
    iget v0, p0, Lmyview/PullToRefreshLayout;->state:I

    if-ne v0, v11, :cond_15

    .line 493
    const/4 v0, 0x4

    invoke-direct {p0, v0}, Lmyview/PullToRefreshLayout;->changeState(I)V

    .line 495
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

    if-eqz v0, :cond_15

    .line 496
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

    invoke-interface {v0, p0}, Lmyview/PullToRefreshLayout$OnRefreshListener;->onLoadMore(Lmyview/PullToRefreshLayout;)V

    goto :goto_3

    .line 378
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_4
        :pswitch_3
        :pswitch_0
        :pswitch_0
        :pswitch_2
        :pswitch_2
    .end packed-switch
.end method

.method public loadmoreFinish(I)V
    .locals 4
    .param p1, "refreshResult"    # I

    .prologue
    const/4 v3, 0x0

    .line 275
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadingView:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->clearAnimation()V

    .line 276
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadingView:Landroid/view/View;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 277
    packed-switch p1, :pswitch_data_0

    .line 288
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateImageView:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

    .line 289
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090099

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 290
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateImageView:Landroid/view/View;

    const v1, 0x7f0200a0

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    .line 293
    :goto_0
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    const/4 v1, 0x0

    cmpg-float v0, v0, v1

    if-gez v0, :cond_0

    .line 296
    new-instance v0, Lmyview/PullToRefreshLayout$3;

    invoke-direct {v0, p0}, Lmyview/PullToRefreshLayout$3;-><init>(Lmyview/PullToRefreshLayout;)V

    .line 304
    const-wide/16 v1, 0x3e8

    invoke-virtual {v0, v3, v1, v2}, Lmyview/PullToRefreshLayout$3;->sendEmptyMessageDelayed(IJ)Z

    .line 310
    :goto_1
    return-void

    .line 281
    :pswitch_0
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateImageView:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

    .line 282
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090098

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 283
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadStateImageView:Landroid/view/View;

    const v1, 0x7f0200a1

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    goto :goto_0

    .line 307
    :cond_0
    const/4 v0, 0x5

    invoke-direct {p0, v0}, Lmyview/PullToRefreshLayout;->changeState(I)V

    .line 308
    invoke-direct {p0}, Lmyview/PullToRefreshLayout;->hide()V

    goto :goto_1

    .line 277
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
    .end packed-switch
.end method

.method protected onLayout(ZIIII)V
    .locals 6
    .param p1, "changed"    # Z
    .param p2, "l"    # I
    .param p3, "t"    # I
    .param p4, "r"    # I
    .param p5, "b"    # I

    .prologue
    const/4 v2, 0x1

    const/4 v5, 0x0

    .line 594
    const-string v0, "Test"

    const-string v1, "Test"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 595
    iget-boolean v0, p0, Lmyview/PullToRefreshLayout;->isLayout:Z

    if-nez v0, :cond_0

    .line 598
    invoke-virtual {p0, v5}, Lmyview/PullToRefreshLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    .line 599
    invoke-virtual {p0, v2}, Lmyview/PullToRefreshLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->pullableView:Landroid/view/View;

    .line 600
    const/4 v0, 0x2

    invoke-virtual {p0, v0}, Lmyview/PullToRefreshLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    .line 601
    iput-boolean v2, p0, Lmyview/PullToRefreshLayout;->isLayout:Z

    .line 602
    invoke-direct {p0}, Lmyview/PullToRefreshLayout;->initView()V

    .line 603
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    check-cast v0, Landroid/view/ViewGroup;

    invoke-virtual {v0, v5}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 604
    invoke-virtual {v0}, Landroid/view/View;->getMeasuredHeight()I

    move-result v0

    int-to-float v0, v0

    .line 603
    iput v0, p0, Lmyview/PullToRefreshLayout;->refreshDist:F

    .line 605
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    check-cast v0, Landroid/view/ViewGroup;

    invoke-virtual {v0, v5}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 606
    invoke-virtual {v0}, Landroid/view/View;->getMeasuredHeight()I

    move-result v0

    int-to-float v0, v0

    .line 605
    iput v0, p0, Lmyview/PullToRefreshLayout;->loadmoreDist:F

    .line 609
    :cond_0
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    .line 610
    iget v1, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v2, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    add-float/2addr v1, v2

    float-to-int v1, v1

    iget-object v2, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getMeasuredHeight()I

    move-result v2

    sub-int/2addr v1, v2

    .line 611
    iget-object v2, p0, Lmyview/PullToRefreshLayout;->refreshView:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getMeasuredWidth()I

    move-result v2

    iget v3, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v4, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    add-float/2addr v3, v4

    float-to-int v3, v3

    .line 609
    invoke-virtual {v0, v5, v1, v2, v3}, Landroid/view/View;->layout(IIII)V

    .line 612
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->pullableView:Landroid/view/View;

    iget v1, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v2, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    add-float/2addr v1, v2

    float-to-int v1, v1

    .line 613
    iget-object v2, p0, Lmyview/PullToRefreshLayout;->pullableView:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getMeasuredWidth()I

    move-result v2

    iget v3, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v4, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    add-float/2addr v3, v4

    float-to-int v3, v3

    .line 614
    iget-object v4, p0, Lmyview/PullToRefreshLayout;->pullableView:Landroid/view/View;

    invoke-virtual {v4}, Landroid/view/View;->getMeasuredHeight()I

    move-result v4

    add-int/2addr v3, v4

    .line 612
    invoke-virtual {v0, v5, v1, v2, v3}, Landroid/view/View;->layout(IIII)V

    .line 615
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    .line 616
    iget v1, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v2, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    add-float/2addr v1, v2

    float-to-int v1, v1

    iget-object v2, p0, Lmyview/PullToRefreshLayout;->pullableView:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getMeasuredHeight()I

    move-result v2

    add-int/2addr v1, v2

    .line 617
    iget-object v2, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getMeasuredWidth()I

    move-result v2

    .line 618
    iget v3, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget v4, p0, Lmyview/PullToRefreshLayout;->pullUpY:F

    add-float/2addr v3, v4

    float-to-int v3, v3

    iget-object v4, p0, Lmyview/PullToRefreshLayout;->pullableView:Landroid/view/View;

    invoke-virtual {v4}, Landroid/view/View;->getMeasuredHeight()I

    move-result v4

    add-int/2addr v3, v4

    .line 619
    iget-object v4, p0, Lmyview/PullToRefreshLayout;->loadmoreView:Landroid/view/View;

    invoke-virtual {v4}, Landroid/view/View;->getMeasuredHeight()I

    move-result v4

    .line 618
    add-int/2addr v3, v4

    .line 615
    invoke-virtual {v0, v5, v1, v2, v3}, Landroid/view/View;->layout(IIII)V

    .line 620
    return-void
.end method

.method public refreshFinish(I)V
    .locals 4
    .param p1, "refreshResult"    # I

    .prologue
    const/4 v3, 0x0

    .line 228
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshingView:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->clearAnimation()V

    .line 229
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshingView:Landroid/view/View;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 230
    packed-switch p1, :pswitch_data_0

    .line 242
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateImageView:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

    .line 243
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090094

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 244
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateImageView:Landroid/view/View;

    .line 245
    const v1, 0x7f020107

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    .line 248
    :goto_0
    iget v0, p0, Lmyview/PullToRefreshLayout;->pullDownY:F

    const/4 v1, 0x0

    cmpl-float v0, v0, v1

    if-lez v0, :cond_0

    .line 251
    new-instance v0, Lmyview/PullToRefreshLayout$2;

    invoke-direct {v0, p0}, Lmyview/PullToRefreshLayout$2;-><init>(Lmyview/PullToRefreshLayout;)V

    .line 259
    const-wide/16 v1, 0x3e8

    invoke-virtual {v0, v3, v1, v2}, Lmyview/PullToRefreshLayout$2;->sendEmptyMessageDelayed(IJ)Z

    .line 265
    :goto_1
    return-void

    .line 234
    :pswitch_0
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateImageView:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

    .line 235
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateTextView:Landroid/widget/TextView;

    const v1, 0x7f090093

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 236
    iget-object v0, p0, Lmyview/PullToRefreshLayout;->refreshStateImageView:Landroid/view/View;

    .line 237
    const v1, 0x7f020108

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    goto :goto_0

    .line 262
    :cond_0
    const/4 v0, 0x5

    invoke-direct {p0, v0}, Lmyview/PullToRefreshLayout;->changeState(I)V

    .line 263
    invoke-direct {p0}, Lmyview/PullToRefreshLayout;->hide()V

    goto :goto_1

    .line 230
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
    .end packed-switch
.end method

.method public setOnRefreshListener(Lmyview/PullToRefreshLayout$OnRefreshListener;)V
    .locals 0
    .param p1, "listener"    # Lmyview/PullToRefreshLayout$OnRefreshListener;

    .prologue
    .line 179
    iput-object p1, p0, Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;

    .line 180
    return-void
.end method
